<template>
  <a-config-provider
    :locale="locale"
    :theme="{
      token: {
        borderRadius: 0
      }
      // algorithm: theme.darkAlgorithm
    }">
    <router-view v-slot="{ Component }">
      <component :is="Component" />
    </router-view>
  </a-config-provider>
</template>

<script>
import { theme } from 'ant-design-vue'
import { getStore, removeStore } from 'utils/util.js'

import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')

export default {
  name: 'App',
  data() {
    return {
      locale: zhCN,
      theme
    }
  },
  mounted() {
    // 登录方式 1账号密码(未绑定钉钉) 2钉钉扫码
    let loginType = getStore('loginType')
    let succLogin = getStore('succLogin')

    if (loginType && succLogin) {
      this.$message.success('登录成功')
      removeStore('loginType')
      removeStore('succLogin')
    }
  }
}
</script>

<style></style>
